using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;

namespace DiceEngine
{
    public class Dice : IDice
    {
        public Dice()
        {

        }
        public Dice(List<DiceFace> faces)
        {
            DieFaces = faces;
        }

        public List<string> FaceNames()
        {
            var faces = new List<string>();
            foreach (DiceFace df in DieFaces)
            {
                faces.Add(df.Name);
            }
            return faces;
        }

        public override string ToString()
        {
            return string.Empty;
        }

        public List<DiceFace> DieFaces { get; set; }

        public DiceFace Roll()
        {
            Random random = new Random();
            int dieRoll = random.Next(0, DieFaces.Count());
            return DieFaces.ElementAt(dieRoll);
        }
    }
}
